package com.hyts.rpclet.serialize;

import java.io.InputStream;
import java.io.OutputStream;

/**
 * project-name:coffice-toolbox
 * package-name:com.hyts.rpclet.serialize
 * author:Libo/Alex
 * create-date:2019-07-10 12:12
 * copyright:libo-hyts-github
 * email:libo2dev@aliyun.com
 * description:此类主要用于:
 */
public interface RpcletSerializer {

    /**
     * 获取序列化类型
     * @return
     */
    String getSerializeType();

    /**
     * 解码
     * @return
     */
    Object decode(InputStream inputBuf, Class parameterType);

    /**
     * 编码
     * @param outputStream
     * @param value
     */
    void encode(OutputStream outputStream, Object value);

}
